<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改【请填写功能名称】')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-relation-edit" th:object="${jifenProductPointsRelation}">
            <input name="relationId" th:field="*{relationId}" type="hidden">
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">商品SKU：</label>
                    <div class="col-sm-8">
                        <input name="skuId" th:field="*{skuId}" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">${comment}：</label>
                    <div class="col-sm-8">
                        <input name="categoryId" th:field="*{categoryId}" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">积分换算比例：</label>
                    <div class="col-sm-8">
                        <input name="pointsRatio" th:field="*{pointsRatio}" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">${comment}：</label>
                    <div class="col-sm-8">
                        <input name="ruleId" th:field="*{ruleId}" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/relation";
        $("#form-relation-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-relation-edit').serialize());
            }
        }
    </script>
</body>
</html>